package com.luocc.tim.entity;

import java.io.Serializable;
import java.util.Date;

public class Message implements Serializable {
    public static final long serialVersionUID = 1L;
    private long id;
    private String sender;
    private String receiver;
    private String content;
    private Date date;
    private int type;

    public Message() {

    }

    public Message(int type) {
        this.type = type;
    }

    /**
     *
     * @param sender 消息发出者
     * @param receiver 消息接收者
     * @param content 内容
     */
    public Message(String sender, String receiver, String content, Date date) {
        this(0, sender, receiver, content, date, 0);
    }

    public Message(String sender, String receiver, String content, Date date, int type) {
        this(0, sender, receiver, content, date, type);
    }

    public Message(long id, String sender, String receiver, String content, Date date, int type) {
        this.id = id;
        this.sender = sender;
        this.receiver = receiver;
        this.content = content;
        this.date = date;
        this.type = type;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
